/* Simplified example program for F07BEF
C Version. NAG Copyright 1999. */
#include
#include
#include
#define N 4
#define NRHS 2
#define KL 1
#define KU 2
#define LDAB (2*KL+KU+1)
main()
{
int n = N, n1 = N-1, kl = KL, ku = KU, ldab = LDAB, nrhs = NRHS,
i, j, ia, jstart, jend;
int info, ifail, k;
double ab[LDAB*N];
double a[12] = {-0.23, 2.54, -3.66,
-6.98, 2.46, -2.73, -2.13,
2.56, 2.46, 4.07,
-4.78, -3.82};
/* The matrix b is loaded in column major order */
double b[N][NRHS] = { 4.42, 27.13, -6.14, 10.50,
-36.01, -31.67, -1.16, -25.82};
int ipiv[N];
#define AB(I,J) ab[(I)-1 + ((J)-1)*ldab]
for (i=0; i<20; i++) ab[i] = 9.9e99;
puts("F07BEF Example Program Results");
k = kl+ku+1;
ia = 0;
for (i=1; i<=n; i++)
{
jstart = i-kl>=1 ? i-kl : 1;
jend = i+ku